#include <stdio.h>
#include <stdlib.h>
#include <time.h>

// get random num between 0 and (num-1)
int getRand(int num)
{
    if(num <= 0) return 0;

    return rand() % num;    
}

int main(int argc, char *argv[])
{
    int red[33];
    int blue[16];
    int i, j, tmp;
    for(i = 0; i < 33; i++)
    {
        red[i] = i + 1;
    }
    for(i = 0; i < 16; i++)
    {
        blue[i] = i + 1;
    }
    srand(time(NULL));
    for(i = 0; i < 6; i++)
    {
        tmp = getRand(33);
        j = red[32 - i];
        red[32 - i] = red[tmp];
        red[tmp] = j;
    }
    tmp = getRand(16);
    printf("red: %d, %d, %d, %d, %d, %d   blue: %d\n",
        red[32], red[31], red[30], red[29], red[28], red[27], blue[tmp]);
    return 0;
}
